package router

import (
	"api-gateway/handler/service"
	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	r := gin.Default()
	r.POST("/register", service.Register)
	r.POST("/login", service.Login)
	r.POST("/sendSms", service.SendSms)
	r.POST("/ossUpload", service.OssUpload)
	r.POST("/publishVideo", service.PublishVideo)
	r.POST("/checkVideo", service.CheckVideo)
	r.GET("/getVideoList", service.GetVideoList)
	r.GET("/searchVideoList", service.SearchVideoList)
	r.GET("/getEpisodeList", service.GetEpisodeList)
	r.GET("/lookVideo", service.LookVideo)
	r.POST("/createEpisodeLog", service.CreateEpisodeLog)
	r.GET("/getEpisodeLog", service.GetEpisodeLog)
	r.POST("/addFavorite", service.AddFavorite)
	r.GET("/getFavorite", service.GetFavorite)
	r.GET("/esSearchList", service.EsSearchList)
	r.POST("/hot", service.Hot)
	r.GET("/getMember", service.GetMember)
	r.POST("/aliPayCallback", service.AliPayCallback)
	return r
}
